fix(workflow-engine): only commit step state after success#5010
Conversation
|
🚅 Deployed to the rivet-pr-5010 environment in rivet-frontend
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Code Review: fix(workflow-engine): only commit step state after success
OverviewThis PR fixes a correctness bug in workflow-engine where actor state mutations inside a failing step were being persisted even though the step needs to be retried. On retry, the step would execute against incorrectly mutated state. The fix:
The core idea is correct and addresses a real workflow replay bug. Bug: Breaks stateless actors using workflow steps
This means any actor that uses workflow steps but does not have a Concern:
|
| Area | Finding |
|---|---|
| Core logic | Correct - rollback on step failure fixes a real replay bug |
| Bug | Stateless actors with workflow steps crash on RAW_STATE_SYMBOL() before step runs |
| Concern | structuredClone(vars) throws if vars contains non-cloneable objects |
| Minor | Notification fires before flush for exhausted/timeout errors (slightly wider crash window) |
| Test name | 'should not commit step error data' contradicts what the test actually asserts |
| PR hygiene | Description, type checkboxes, and test description are all empty; PR is still in draft |
The core approach is sound. Please address the stateless actor crash (and consider the vars clone concern) before merging.
56af1d1 to
aac9634
Compare
cc1baa6 to
9304f04
Compare
aac9634 to
5f7bac7
Compare
9304f04 to
0668fa7
Compare
0668fa7 to
2c029c2
Compare
2c029c2 to
9b64fa5
Compare
9b64fa5 to
0eb8f51
Compare
8c70217 to
00af8a0
Compare
ad1ebe6 to
6d4d578
Compare
2258fbe to
aa538e5
Compare
aa538e5 to
a70e048
Compare
6d4d578 to
d02776c
Compare
a70e048 to
904ee37
Compare
d02776c to
2afe212
Compare
904ee37 to
4480579
Compare
4480579 to
5c16781
Compare
Merge activity
|
5c16781 to
4628cd9
Compare

Description
Please include a summary of the changes and the related issue. Please also include relevant motivation and context.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist: